fruits = {"banana","orange","apple"}
-- 返回 table 连接后的字符串
print("连接后的字符串 ",table.concat(fruits))

-- 指定连接字符
print("连接后的字符串 ",table.concat(fruits,", "))

-- 指定索引来连接 table
print("连接后的字符串 ",table.concat(fruits,", ", 2,3))

network = {
    {name = "grade1",IP = "192.168.1.1"},
    {name = "grade2",IP = "192.168.1.2"},
    {name = "grade3",IP = "192.168.1.3"},
    {name = "grade2",IP = "192.168.1.3"},
    {name = "grade9",IP = "192.168.1.3"},
}

table.sort(network,function(a,b) return (a.name > b.name) end)
for k = 1,#network do
    print(network[k].name,network[k].IP)
end

